<?php namespace Cribbb\Storage\User;
 
use User;
 
class EloquentUserRepository implements UserRepository {
 
	/**
	 * Retrieving All Models
	 */
	public function all()
	{
		return User::all();
	}
	
	/**
	 * Retrieving A Record By Primary Key
	 */
	public function find($id)
	{
		return User::find($id);
	}
	
	public function create($input)
	{
		return User::create($input);
	}
	
	public function update($id)
	{
		$user = $this->find($id);
		$user->save(\Input::all());
	
		return $user;
	}
	
	public function delete($id)
	{
		$user = $this->find($id);
	
		return $user->delete();
	}
}